import pinia from '@/stores'
import { useUserStore } from '@/stores/user'
const UserStore = useUserStore(pinia)
export const isHasButton = (app: any) => {
  app.directive('hasButton', {
    mounted(el: any, binding: any) {
      if (!UserStore.buttons.includes(binding.value)) {
        el.parentNode.removeChild(el)
      }
    }
  })
}
